<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<title>网元管理</title>
<meta name="decorator" content="default" />
<tags:import includes="spinner,bootbox"></tags:import>
<script src="${ctxStatic}/modules/cfg/cfg.js"></script>
<script>
	function page(n, s) {
		$("#pageNo").val(n);
		$("#pageSize").val(s);
		$("#frmSearch").submit();
		return false;
	}
</script>
</head>
<body>
	<br>
	<form id="frmSearch" modelAttribute="item" action="${ctx}/cfg/ne/"
		method="post" class="breadcrumb form-search">
		<%-- 	<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>		
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>	 --%>
		<label>类型：</label>
		<widgets:select datasource="${fns:getModuleList('network_topo')}"
			width="130" dictName="fieldType" dataPlaceholder="字典类型">
		</widgets:select>
		&nbsp;&nbsp; <label>标签 ：</label><input type="text" name="label"
			htmlEscape="false" maxlength="50" class="input-medium" /> &nbsp;<input
			id="btnQuery" class="btn btn-success" " type="submit" value="查询" />
		&nbsp;<input id="btnNew" class="btn" type="button" value="新增" />
		&nbsp;<input id="btnDelete" class="btn" type="button" value="删除" />
		&nbsp;<input id="btnConn" class="btn" type="button" value="连接" />
		&nbsp;<input id="btnDisConn" class="btn" type="button" value="断开" />
	</form>
	<br>
	<br>
	<table id="contentTable"
		class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th class="center" style="width: 50px;"><label> <input
						type="checkbox" class="ace" /> <span class="lbl"></span>
				</label></th>
				<th>网元名称</th>
				<th>IP</th>
				<th>SNMP版本</th>
				<th>板卡类型</th>
				<th>编辑</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${page}" var="item">
				<tr>
					<td class="center"><label> <input value="${item.id}"
							type="checkbox" class="ace" /> <span class="lbl"></span>
					</label></td>
					<td>${item.name}</td>
					<td>${item.mgr_ne_ipaddr}</td>
					<td>${fns:getDictLabel(item.mgr_ne_snmpver, 'snmp_ver',
						'N/A')}</td>
					<td>${fns:getDictLabel(item.mgr_ne_type, 'mgr_ne_type',
						'N/A')}</td>
					<td><a
						href="javascript:onDelete('${item.formId}', '${item.catalog}')">删除</a>
						<a href="javascript:onUpdate('${item.formId}', '${item.catalog}')">编辑</a>
					</td>
				</tr>
			</c:forEach>
		</tbody>
	</table>
	<widgets:treeview url="/sys/config/listCfgDTO/mgr_ne" 
  		callbackPID="parentId"
  		callbackPIDS="parentIds"
		callbackName="callbackName">
	</widgets:treeview> 
	<!-- 模态窗体 -->
	<div id="modalTable" action="new" class="modal fade" tabindex="-1"
		style="display: none; width: 402px; height: 452px;z-index:1049;">
		<div class="modal-dialog">
			<div class="modal-content" style="width: 400px; height: 300px;">
				<div class="modal-header no-padding">
					<div class="table-header">
						<button type="button" class="close" data-dismiss="modal"
							aria-hidden="true">
							<span class="white">&times;</span>
						</button>
						<span id='modalTitle'>新增窗体</span>
					</div>
				</div>

				<!-- 新增窗体内部 -->
				<form id="frmSubmit" class="form-horizontal" role="form"
					method="post">
					<widgets:form withYesNo="false"  catalog="mgr_ne"></widgets:form>
					<%-- <input type="hidden" name="userId" value="${userId}" uname="update"/> 
					<input type="hidden" name="id" uname="update"/>
							
					<div class="space-4"></div>
					<div class="form-group">
						<label class="col-sm-3 control-label no-padding-right">标签名称</label>
						<div class="col-sm-9">
							<input type="text" class="col-xs-10"
								name="label" uname="update"/>
						</div>
					</div>

					<div class="form-group">
						<label class="col-sm-3 control-label no-padding-right">值</label>
						<div class="col-sm-9">
							<input type="text" class="col-xs-10"
								name="value" uname="update"/>
						</div>
					</div>

					<div class="form-group">
						<label class="col-sm-3 control-label no-padding-right">字典类型</label>
						<div class="col-sm-9">
							<input type="text" class="col-xs-10"
								name="type" uname="update"/>
						</div>
					</div>
					
					<div class="form-group">
						<label class="col-sm-3 control-label no-padding-right">描述</label>
						<div class="col-sm-9">
							<input type="text" class="col-xs-10"
								name="description" uname="update"/>
						</div>
					</div>
					
					<div class="form-group">
						<label class="col-sm-3 control-label no-padding-right"
							for="form-field-1"> 排序 </label>

						<div class="col-sm-9">
							<input style="width: 195px;" type="text"  placeholder="数字越大，排序越靠前"
								class="col-xs-10 col-sm-5" id="sort" name="sort" uname="update"/>
						</div>
					</div> --%>

					<div class="space-4"></div>
					<div class="clearfix form-actions">
						<div class="center">
							<button id="btnSubmit" class="btn btn-info" type="button">
								<i class="icon-ok bigger-110"></i> 保存
							</button>
							&nbsp; &nbsp; &nbsp;
							<button class="btn" type="reset">
								<i class="icon-undo bigger-110"></i> 重置
							</button>
						</div>
					</div>
				</form>
				<!-- PAGE CONTENT ENDS -->
			</div>
			<!-- /.modal-content -->
		</div>
		<!-- /.modal-dialog -->
	</div>
</body>
</html>